package cn.aitrox.ry.app.web.controller.dwh;

import cn.aitrox.ry.bean.RespResult;
import cn.aitrox.ry.common.controller.BaseController;
import cn.aitrox.ry.service.dwh.dto.DwhImageDto;
import cn.aitrox.ry.service.dwh.dto.in.DwhImageQueryInDto;
import cn.aitrox.ry.service.dwh.feign.DwhImageFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class DwhImageController extends BaseController {

    @Autowired
    @Lazy
    private DwhImageFeign dwhImageFeign;

    @PostMapping(value = "/dwh/image/query")
    RespResult<Map<String, List<DwhImageDto>>> imageQuery(@Validated @RequestBody DwhImageQueryInDto input) {
        return dwhImageFeign.imageQuery(input);
    }
}
